﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="ViewAllUsers.aspx.vb" Inherits="BeachesInGreeceComplete.ViewAllUsers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="aside2">
        <br />
        <h3>
            Search</h3>
            <br />
            <br />
        <asp:TextBox ID="tb_search" runat="server" />
        <br />
        <br />
        <asp:Button ID="btn_findByName" runat="server" Text="By Name" CssClass="m-btn blue" />
        <asp:Button ID="btn_findByRegion" runat="server" Text="By UserName" CssClass="m-btn blue" />
        </div>

<h2>All Members</h2>
 <div class="mainDiv2">
    <asp:ListView ID="ListView2" runat="server" DataKeyNames="ID" DataSourceID="SqlDataSource2">
        <ItemTemplate>
            <li style="">
                <asp:Label ID="lbl_Name" CssClass="BeachNameLabel" runat="server" Text='<%# Eval("Tourist") %>' />
                <br />                                                                      
                    <asp:Label ID="lbl_Time" CssClass="RegionLabel" runat="server" Text='<%# CalculateTime.calculateTimeNoHours(Eval("DateCreated")) %>'/>
                    <br />
                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Tourist", "Profile.aspx?Tourist={0}") %>'>
                        <img src='<%# Eval("Picture") %>'  alt="No picture found"  width="100" height="100" style="border-style: solid; border-width: small" />
                </asp:HyperLink>
                <br />
                <asp:Label ID="TouristLabel" CssClass="RegionLabel" runat="server" Text='<%# Eval("FirstName") %>' />
                <br />
                <asp:Label ID="Label1" CssClass="BeachNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
            </li>
        </ItemTemplate>
        <LayoutTemplate>
            <ul class="ItemContainer">
                <li runat="server" id="itemPlaceholder" />
            </ul>
        </LayoutTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:BeachConnectionString %>"
        ProviderName="<%$ ConnectionStrings:BeachConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Profiles] ORDER BY ID DESC">
    </asp:SqlDataSource>
    <asp:DataPager ID="DataPagerProfiles" runat="server" PagedControlID="ListView2" PageSize="12" Visible="False">
        <Fields>
            <asp:NextPreviousPagerField ShowFirstPageButton="True" ShowNextPageButton="False"
                ButtonType="Link" ButtonCssClass="buttonDataPage" />
            <asp:NumericPagerField ButtonType="Link" />
            <asp:NextPreviousPagerField ShowLastPageButton="True" ShowPreviousPageButton="False"
                ButtonType="Link" ButtonCssClass="buttonDataPage" />
        </Fields>
    </asp:DataPager>
    </div>
</asp:Content>
